
const data = {
    labels: [
        'Red',
        'Blue',
        'Yellow',
        'white',
        'black',
        'pink'
    ],
    datasets: [{
        label: 'My First Dataset',
        data: [150,50, 50, 40,70,100, ],
        backgroundColor: [
            'rgb(255, 99, 132)',
            'rgb(54, 162, 235)',
            'rgb(255, 205, 86)',
            'rgba(15,10,17,0.89)',
            'rgba(15,10,17,0.04)',
            'rgba(180,60,157,0.55)'
        ],
        hoverOffset: 4
    }]
};



// 图
new Chart(document.getElementById("myPieChart"),{
    type:'pie',
    data:data,
})